# -*- coding:utf-8 -*-
"""
@author: ksf

@since: 2020-04-25 19:28
"""
from enum import Enum


class Event:
    def __init__(self, event_type, data):
        self.event_type = event_type
        self.data = data


class EventType(Enum):
    INITIALIZE = '初始化'
    SUBSCRIBE = '订阅'
    CONTRACT = '标的返回'
    BEFORE_TRADING = 'BEFORE_TRADING'
    AFTER_TRADING = 'AFTER_TRADING'
    BAR = 'BAR'
    TICK = 'TICK'
    ACCOUNT = '账户'
    POSITION = '持仓'
    SNAPSHOT = '行情快照'
    ORDER_NEW = '新建订单'
    ORDER_REQ_CHECK = '订单检查'
    ORDER = '订单变化'                                          # 创建订单
    TRADE = 'TRADE'
    SETTLEMENT = 'SETTLEMENT'
    USER = '用户事件'
    TIME = '时钟'
    QUIT = '退出'
    LOG = '日志'

